package cn.kickegg.log.core.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "log.collector")
public class LogCollectorProperties {
    
    private Storage storage = new Storage();
    
    public Storage getStorage() {
        return storage;
    }
    
    public void setStorage(Storage storage) {
        this.storage = storage;
    }
    
    public static class Storage {
        private String type = "mysql";
        private MySQL mysql = new MySQL();
        private Elasticsearch elasticsearch = new Elasticsearch();
        
        public String getType() {
            return type;
        }
        
        public void setType(String type) {
            this.type = type;
        }
        
        public MySQL getMySQL() {
            return mysql;
        }
        
        public void setMySQL(MySQL mysql) {
            this.mysql = mysql;
        }
        
        public Elasticsearch getElasticsearch() {
            return elasticsearch;
        }
        
        public void setElasticsearch(Elasticsearch elasticsearch) {
            this.elasticsearch = elasticsearch;
        }
    }
    
    public static class MySQL {
        private boolean enabled = true;
        
        public boolean isEnabled() {
            return enabled;
        }
        
        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }
    }
    
    public static class Elasticsearch {
        private boolean enabled = false;
        
        public boolean isEnabled() {
            return enabled;
        }
        
        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }
    }
} 